﻿using System.Collections.Generic;

namespace WeiXinPF.Modules.Core.Admin.Application.Services
{
    /// <summary>
    /// 
    /// </summary>
    public class UCardService : IUCardService
    {
        public int GetStoreIdByWeiXinId(int wid)
        {
            int id = 0;
            BLL.wx_ucard_store storeBll = new BLL.wx_ucard_store();

            string condition = string.Format(
                " wid={0} order by createDate desc,id desc", wid);
            IList<Model.wx_ucard_store> storeList = storeBll.GetModelList(condition);
            if (storeList != null && storeList.Count > 0)
            {
                id = storeList[0].id;
            }

            return id;
        }
    }
}
